#!/bin/sh 

f1() {
	for i in 1 2 3 4 5 #有没有引号差别很大
	do
		echo "i=$i"
	done
}

f2() {
	for i in "1 2 3 4 5"; do
		echo $i
	done

	for f in ~/.bash*
	do
		echo $f
	done
}

f3() {
	for((i=1;i<100;i++)); do
		if ((i%3==0));then
			echo -n "$i "
			continue
		fi
	done
	echo
}

f4() {
#	for i in `seq 100`; do
	for i in `seq 1 4 300`; do #first,step,last
		if ((i%3==0));then
			echo -n "$i "
			continue
		fi
	done
	echo
}

f5() {
	min=1
	max=10
	while [ $min -le $max ]; do
		echo $min
		min=`expr $min+1` # has error
		echo $min
	done
}

f6() {
	i=1
	while(($i<10));do
		if (($i%4==0)); then
			echo $i
		fi
		i=$((i+1))
	done
}

$1

